import url from "@/url.config";
export default ({ service, request, tools }) => ({
  //运维人员新增故障方案
  addFaultSolution(data){
    return request({
      url: url.ip1 + "/fault/solution/saveFaultSolution",
      method: "post",
      data: data,
      timeout: 3 * 60 * 1000,
    })
  },
  //删除方案
  delSolution(id){
    return request({
      url: url.ip1 + "/fault/solution/delete/solution/"+id,
      method: "delete",
    })
  },
  //查看解决方案详情
  getSolutionDetail(id){
    return request({
      url: url.ip1 + "/fault/solution/find/solution/detail/"+id,
      method: "get",
    })
  },
  // 获取故障类型
  getSolutionType(){
    return request({
      url: url.ip1 + "/fault/solution/find/fault/type",
      method: "get",
      
    })
  },
  //获取故障分类
  getSolutionClass(){
    return request({
      url:url.ip1+"/fault/solution/find/equipment/type",
      method:'get'
    })
  },
  // 获取污染物信息
  GetPollutants(data) {
    return request({
      url: url.ip1 + "/fault/solution/findPollutantsSolution",
      method: "post",
      data: data,
    });
  },
  // 获取水站信息
  GetWaterQuality(data) {
    return request({
      url: url.ip1 + "/fault/solution/findWaterStationsSolution",
      method: "post",
      data: data,
    });
  },
  //获取空气站信息
  getAirStation(data) {
    return request({
      url: url.ip1 + "/fault/solution/findAirStationSolution",
      method: "post",
      data: data,
    });
  },
  // 获取故障解决方案分页
  faultSolutionFindSolution(data){
    console.log(data)
      return request({
        url:url.ip1+"/fault/solution/find/solution",
        method:"post",
        data:data
      })
  },
  // 审核
  faultSolutionAudit(data){
    return request({
      url:url.ip1+"/fault/solution/audit",
      method:"post",
      data:data
    })
  },
  //查看详情
  getDetail(id) {
    return request({
      url: url.ip1 + "/technical/discussion/findDetail/" + id,
      method: "get",
    });
  },
  //上傳接口
  UploadResources(data) {
    return request({
      url: url.ip1 + "/technical/discussion/uploadFile",
      method: "post",
      data: data,
      timeout: 3 * 60 * 1000,
    });
  },
  //查找最新资源
  getNewData(data) {
    return request({
      url: url.ip1 + "/technical/discussion/findNewFile",
      method: "post",
      data: data,
    });
  },
  //查找最熱資源
  getHotDetail(size) {
    return request({
      url: url.ip1 + "/technical/discussion/findHot/" + size,
      method: "get",
    });
  },
  //获取分类信息
  findType() {
    return request({
      url: url.ip1 + "/technical/discussion/findType/1",
      method: "get",
    });
  },
  //查找内容管理列表
  getContentList(data) {
    return request({
      url: url.ip1 + "/technical/discussion/findContentList",
      method: "post",
      data: data,
    });
  },
  //技术内容审核按钮
  contentReview(data) {
    return request({
      url: url.ip1 + "/technical/discussion/audit",
      method: "post",
      data: data,
    });
  },
  //删除按钮
  delateContent(id) {
    return request({
      url: url.ip1 + "/technical/discussion/deleteOne/" + id,
      method: "delete",
    });
  },
  //批量删除
  batchDeleteContent(data) {
    return request({
      url: url.ip1 + "/technical/discussion/deleteList",
      method: "post",
      data: data,
    });
  },
  //培训学校模块
  //查询分类
  findSchoolType() {
    return request({
      url: url.ip1 + "/training/materials/findType/1300637518390185985",
      method: "get",
    });
  },
  //上传学校文件
  UploadSchoolResources(data) {
    return request({
      url: url.ip1 + "/training/materials/uploadFile",
      method: "post",
      data: data,
      timeout: 3 * 60 * 1000,
    });
  },
  //查找最新资源、、、、、、、、、、
  getSchoolNewData(data) {
    return request({
      url: url.ip1 + "/training/materials/findNewVideo",
      method: "post",
      data: data,
    });
  },
  //查找最熱資源
  getSchoolHotDetail(size) {
    return request({
      url: url.ip1 + "/training/materials/findHot/" + size,
      method: "get",
    });
  },
  //查看详情
  getSchoolDetail(id){

    return request({
      url: url.ip1 + "/training/materials/findDetail/" + id,
      method: "get",
    });
  },
   //查找学校内容管理列表
   getSchoolContentList(data) {
    return request({
      url: url.ip1 + "/training/materials/findContentList",
      method: "post",
      data: data,
    });
  },
  //学校技术内容审核按钮
  SchoolContentReview(data) {
    return request({
      url: url.ip1 + "/training/materials/audit",
      method: "post",
      data: data,
    });
  },
  //学校删除按钮
  delateSchoolContent(id) {
    return request({
      url: url.ip1 + "/training/materials/deleteOne/" + id,
      method: "delete",
    });
  },
  //学校批量删除
  batchDeleteSchoolContent(data) {
    return request({
      url: url.ip1 + "/training/materials/deleteList",
      method: "post",
      data: data,
    });
  },
  //更多页面
  getMore(data){
    return request({
      url: url.ip1 + "/technical/discussion/more",
      method: "post",
      data: data,
    })
  },
  //培训更多页面
  getSchoolMore(data){
    return request({
      url: url.ip1 + "/training/materials/findMore",
      method: "post",
      data: data,
    })
  }
});
